package io.renren.modules.edu.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.renren.common.service.impl.CrudServiceImpl;
import io.renren.modules.edu.dao.EduTeacherDao;
import io.renren.modules.edu.dto.EduTeacherDTO;
import io.renren.modules.edu.entity.EduTeacherEntity;
import io.renren.modules.edu.service.EduTeacherService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;

import java.util.Map;

/**
 * 老师表
 *
 * @author Mark sunlightcs@gmail.com
 * @since 1.0.0 2023-04-24
 */
@Service
public class EduTeacherServiceImpl extends CrudServiceImpl<EduTeacherDao, EduTeacherEntity, EduTeacherDTO> implements EduTeacherService {

    @Override
    public QueryWrapper<EduTeacherEntity> getWrapper(Map<String, Object> params){
        String id = (String)params.get("id");

        QueryWrapper<EduTeacherEntity> wrapper = new QueryWrapper<>();
        wrapper.eq(StringUtils.isNotBlank(id), "id", id);

        return wrapper;
    }


}